<?php
/***************************************************************************
 *                                setup.php
 *
 *   Begin date               : 
 *   Copyright                : 
 *   Email                    : 
 ***************************************************************************/
defined('PHP5_PHP') or die("Application is stopping!!!");
$viewer = $rootPath . "modules/";

//echo $viewer . $module . $php5Ext;
if ( $admin != "insite" )
{

	if($type == "main") {
		$type = "cpanel";
	}		
	if($type) {
		$viewer .= "$type/";
	}		
	//$show = php5GetParam($_REQUEST, 'show', '');
	//echo $viewer . $module . $php5Ext;die;
	if (file_exists($viewer . $module . $php5Ext)) 
	{
		include($rootPath . "modules/main/header" . $php5Ext);
		include($rootPath . "modules/main/top" . $php5Ext);
		include($rootPath . "modules/main/menu" . $php5Ext);
		include($rootPath . "modules/main/footer" . $php5Ext);
		include($viewer . $module . $php5Ext);
		$tpl = sprintf($php5TemplateFile, $language, '', 'index.tpl');
		if(!is_file($tpl )) 
		{
			die("can not find template");
		}
		if (empty($clean)) $smarty->display($tpl);
	}
	else 
	{
		require_once($php5RootPath . "/under-construction.php");
	}

}

